package com.ybkj.daijia.server.model;

import java.math.BigDecimal;

/**
 * 财务记录
 *
 * @author Shine
 */
//@Entity
//@Table(name = Constant.TABLE_PREFIX + "financial_record")
//@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)

/*修改了orderId 和 orderType的定义,
 *当order_type 类型是7时,orderId表示passengerId
 */
public class FinancialRecord extends Base {

    /**
     * 未审核的记录
     */
    public static final int FINANCIALRECORD_WAIT = 0;
    /**
     * 审核过的记录
     */
    public static final int FINANCIALRECORD_OK = 1;
    public static final int FINANCIALRECORD_TYPE_RENGONG = 0;
    public static final int FINANCIALRECORD_TYPE_XINXI = 1;
    public static final int FINANCIALRECORD_TYPE_SHOURU = 2;
    public static final int FINANCIALRECORD_TYPE_BAOXIAO = 3;
    public static final int FINANCIALRECORD_TYPE_MANAGERTIXIAN = 4;//客户经理提现
    public static final int FINANCIALRECORD_TYPE_MEMBERREBATE = 5;// 司机推荐提成收入
    public static final int FINANCIALRECORD_TYPE_MANAGERDAISHOU = 6;//客户经理代收(客户经理提成承担费)
    public static final int FINANCIALRECORD_TYPE_WORKCAR = 7;//工作车费
    public static final int FINANCIALRECORD_TYPE_MANAGERFEE = 8;//客户经理提成承担费
    public static final int FINANCIALRECORD_TYPE_SUB_MEMBERREBATE = 9;// 被司机推荐提成扣除
    public static final int FINANCIALRECORD_TYPE_MEMBERREBATE_REWARD = 10;// 司机推荐提成奖励提现
    public static final int ORDER_TYPE_DAIJIA = 0;
    public static final int ORDER_TYPE_ZHUANCHE = 1;
    public static final int ORDER_TYPE_PAOTUI = 2;
    public static final int ORDER_TYPE_ZUCHE = 3;
    public static final int ORDER_TYPE_FREIGHT = 4;
    public static final int ORDER_TYPE_ZHUANXIAN = 5;
    public static final int ORDER_TYPE_GASSTATION = 6;
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    //	@Column(nullable = false)
    private String code;//流水号

    //	@Column(nullable = false)
    private BigDecimal money;//金额

    //	@Column(nullable = false)
    private String who;//对象

    //	@Column(nullable = false)
    private Long companyId;//公司id

    //	@Column(nullable = false)
    private String companyName;//公司简称

    private Long orderCompanyId;//订单公司id

    private String orderCompanyName;//公司简称

    //	@Lob
    private String memo;//备注

    //	@Column(nullable = false)
    private Integer status;

    private Long orderId;//订单号

    private Integer type;

    private Integer orderType;//订单类型 0代驾,1专车,2跑腿,3租车

    public BigDecimal getMoney() {
        if (null == money) {
            return BigDecimal.ZERO;
        }
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getWho() {
        return who;
    }

    public void setWho(String who) {
        this.who = who;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getOrderCompanyId() {
        return orderCompanyId;
    }

    public void setOrderCompanyId(Long orderCompanyId) {
        this.orderCompanyId = orderCompanyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getOrderCompanyName() {
        return orderCompanyName;
    }

    public void setOrderCompanyName(String orderCompanyName) {
        this.orderCompanyName = orderCompanyName;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Integer getStatus() {
        if (null == status) {
            return FINANCIALRECORD_WAIT;
        }
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getOrderId() {
        return orderId;
    }

    /****
     * @param orderId
     */
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getOrderType() {
        return orderType;
    }

    /****
     * @param orderType
     */
    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }


}
